import type { Metadata } from "next"; import Link from "next/link"; import { getLocale } from "@/lib/i18n/server"; import { href, t } from "@/lib/i18n"; import { topicsWithCounts } from "@/lib/papers/queries"; export const revalidate = 300; export async function generateMetadata(): Promise { const d = t(await getLocale()); return { title: d.topics.title, description: d.topics.lead, alternates: { canonical: "/topics" } }; } export default async function TopicsPage() { const locale = await getLocale(); const d = t(locale); const rows = await topicsWithCounts(); const domains = rows.filter((r) => r.kind === "domain"), topics = rows.filter((r) => r.kind === "topic" && r.n > 0); return (

{d.topics.title}

{d.topics.lead}

{d.topics.domains}

{d.topics.all}

); }